﻿using System.Security.Principal;

namespace Inovout.Security
{
    public class UserPrincipal : GenericPrincipal
    {
        protected internal UserPrincipal(IUser user, bool isAuthenticated)
            : this(new UserIdentity(user, isAuthenticated))
        {
        }
        protected internal UserPrincipal(IIdentity identity, string[] roles = null)
            : base(identity, roles)
        { }
        public static UserPrincipal AnonymousUserPrincipal
        {
            get { return new UserPrincipal(BuiltInUser.AnonymousUser, false); }
        }
    }
}
